﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;

namespace BookNet
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public string ChooseImage(string url)
        {
            return url;
            //HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri(url));
            //ServicePointManager.Expect100Continue = false;
            //try
            //{
            //    ((HttpWebResponse)request.GetResponse()).Close();
            //}
            //catch (WebException exception)
            //{
            //    return "images/books/book7.jpg";
            //}
            //return url;
        }

        public string ChooseAvatar(string avatar)
        {
            if (avatar.Equals(""))
                return "images/anonymous.gif";
            else
                return avatar;
        }
    }
}
